An "over" in compositing is A+B(1-a) meaning that before adding A and B, a holdout matte is made by inverting the alpha. I’m wondering how to do this in OSL with a closure, so instead of simply adding two closures together:
Ci = spec_closure + diffuse_closure;
The reason I want to do this is that I am trying to combine two subsurface scattering closures using an over. So assuming subsurfaceA has a small scatter radius, subsurfaceB has a large scatter radius, I want to use the “alpha” of subsurfaceA to make subsurfaceB transparent (creating a holdout matte), and then add subsurfaceA to subsurfaceB... thus doing an “over” operation rather than a “plus.”
OSL does have a “holdout” signaling closure which appears to be made for this purpose, but the Vray docs say it does not support signaling closures. So that wont work.
Anyone have any ideas as to how best to do this?
Ci = spec_closure + diffuse_closure;
The reason I want to do this is that I am trying to combine two subsurface scattering closures using an over. So assuming subsurfaceA has a small scatter radius, subsurfaceB has a large scatter radius, I want to use the “alpha” of subsurfaceA to make subsurfaceB transparent (creating a holdout matte), and then add subsurfaceA to subsurfaceB... thus doing an “over” operation rather than a “plus.”
OSL does have a “holdout” signaling closure which appears to be made for this purpose, but the Vray docs say it does not support signaling closures. So that wont work.
Anyone have any ideas as to how best to do this?
Comment